Skip to main content

Customization of Siemens workplace

To be able to efficiently set up and deploy Federated Learning workloads, it is necessary to have an environment from which user can work. Throughout the documentation we call this environment Service computer. It may be essentially a Siemens standard digital workplace with some extra tools installed. This part of the documentation will explain what and how to install.

Goal

In this part of the documentation we install the following software. In case you already have it or know how to install it, you may do it your preferred way (e.g. install ansible into python virtual environment)

  • unix-like operating system (Windows with WSL, Linux, Macbook)
  • SSH
  • Python
  • Ansible

To be able to deploy FL stack, you have to install a deployment automation tool called Ansible to the service computer, from which you execute the deployment tasks. This is usually on a computer you can connect to the on-premise network to perform the initial installation tasks. Ansible uses SSH to execute all commands on the target compute node(s). The following diagram may be useful to illustrate the deployment:

Procedure

  1. Run windows command line as Administrator and then write:

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  2. Restart the PC.

  3. Run windows command line and then write:

    wsl --set-default-version 2
    wsl --update
    wsl --install -d Debian
  4. Suddenly a prompt for username and password jumps out. Fill it in. Afterward Linux terminal becomes accessible.
    Note: Recently a "RemoteApp" confirmation window started to pop out everytime you start WSL. Until this is solved more systematically, either press everytime "yes" or create a file .wslconfig in your Windows %userprofile% directory with the following content:

    [wsl2]
    guiApplications=false
  5. Siemens network doesn't set the DNS server properly, so first we have to set the DNS server address. Edit /etc/wsl.conf by running sudo nano /etc/wsl.conf, add the following two lines:

    [network]
    generateResolvConf = false
  6. Shutdown WSL by writing

    wsl.exe --shutdown
  7. Start the WSL again by running "debian" command from the start menu.

  8. Create new file by writing

    sudo nano /etc/resolv.conf

    then paste the following line there and save the file:

    nameserver 8.8.8.8

    You can also use different nameserver(s) if you want.

  9. Protect the file from change:

    sudo chattr +i /etc/resolv.conf
  10. Finally, update and upgrade the Linux subsystem and install the tools that we need:

    sudo apt update
    sudo apt upgrade
    sudo apt install ssh python3 python3-pip python3-venv curl unzip
    python3 -m venv venv
    source venv/bin/activate
    pip install "ansible<7" azure-cli

  11. Windows Subsystem for Linux is ready to be used. Proceed to the next step of the installation guide. Note that for the next steps in the tutorial, you should activate virtual environment everytime you run a new terminal window:

    user@servicepc:~$
    user@servicepc:~$ ansible --version
    -bash: ansible: command not found
    user@servicepc:~$ source venv/bin/activate
    (venv) user@servicepc:~$ ansible --version
    ansible [core 2.13.10]
    ....